<template>
  <ant-modal
    modalWidth="840"
    modalHeight="780"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model
      ref="form"
      :model="form"
      :rules="rules"
      slot="content"
      layout="vertical"
    >
      <a-row :gutter="32">
        <a-col :span="13">
          <a-row :gutter="32">
            <a-col :span="24">
              <a-form-model-item label="考核标题" prop="title">
                <a-input v-model="form.title" placeholder="请输入标题" />
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="截止时间" prop="endTime">
                <a-date-picker
                  v-model="form.endTime"
                  valueFormat="YYYY-MM-DD"
                  :show-today="true"
                  placeholder="选择日期"
                  width="100%"
                />
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="文件上传" prop="">
                <file-upload
                  :fileList="fileList"
                  @afterUpload="uploadCompleteFile"
                  @removeFile="handlerRemoveFile"
                ></file-upload>
              </a-form-model-item>
            </a-col>
          </a-row>
        </a-col>
        <a-col
          :span="11"
          style="border-left: 1.5px solid #ecedee; height: calc(100vh - 45vh)"
        >
          <a-row :gutter="32">
            <a-col :span="24">
              <a-form-model-item label="选择考核对象" prop="">
                <dept-tree
                  ref="deptTree"
                  :deptOptions="deptOptions"
                  :defalutExpandedKeys="expandedKeys"
                  :defalutCheckKeys="[]"
                  @getCheckedKeys="handlerGetcheckedKeys"
                  @select="clickDeptNode"
                />
              </a-form-model-item>
            </a-col>
          </a-row>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button @click="cancel"> 取消 </a-button>
      <a-button type="primary" @click="submitForm"> 保存 </a-button>
    </template>
  </ant-modal>
</template>
<script>
import BizAssessInfoAddForm from "./BizAssessInfoForm";
export default {
  ...BizAssessInfoAddForm,
};
</script>
